#include<iostream>

#include"ClassMate.hh"

ClassMate::ClassMate(){};

ClassMate::ClassMate(std::string name, uint64_t id, bool isGirl, std::string meta){
  m_name=name;
  m_id = id;
  m_isGirl= isGirl;
  m_meta=meta;
  m_previousClassMate=nullptr;
  m_nextClassMate=nullptr;
}

void ClassMate::printInfo(){
  std::cout<<"++++++++++++++++++++++++++++++++"<<std::endl
	   <<"SelfPtr= [0x"<<std::hex << this<<"]"<<std::dec<<std::endl
	   <<"name   = "<< m_name<<std::endl
	   <<"id     = "<< m_id<<std::endl
	   <<"isGirl = "<< m_isGirl<<std::endl
	   <<"meta   = "<< m_meta<<std::endl
	   <<"prevPtr= [0x"<<std::hex << m_previousClassMate<<"]"<<std::dec<<std::endl
	   <<"nextPtr= [0x"<<std::hex << m_nextClassMate<<"]"<<std::dec<<std::endl;
 
  if(m_previousClassMate!=nullptr){
    std::cout<< m_previousClassMate->m_name<<"---->";
  }
  std::cout<<"@"<<m_name;
  if(m_nextClassMate!=nullptr){
    std::cout<<"---->"<< m_nextClassMate->m_name;
  }
  std::cout<< std::endl;
  std::cout<<"================================"<<std::endl;		 
}
